//
// Created by Semir on 2020/4/23.
//

#include <iostream>
#include <string>
#include <cstring>

using namespace std;

const int MAX_LEN = 505;
string a, b;
bool carry[MAX_LEN];

void swap(string *a, string *b) {
    string temp = *a;
    *a = *b;
    *b = temp;
}

int main() {
    memset(carry, 0, sizeof(carry));
    cin >> a >> b;
    if (a.length() > b.length()) {
        swap(a, b);
    }
    string concat(b.length() - a.length(), '0');
    a = '0' + concat + a;
    b = '0' + b;
    string res(a.length(), '0');
    for (int i = a.length() - 1; i > 0; i--) {
        int sum = (a[i] - '0') + (b[i] - '0');
        if (carry[i]) {
            sum++;
        }
        res[i] = (sum % 10) + '0';
        if (sum >= 10) {
            carry[i - 1] = 1;
        }
    }
    res[0] = carry[0] ? '1' : '0';
    for (int i = 0; i < res.length(); i++) {
        if (res[i] != '0') {
            res = res.substr(i);
            cout << res << endl;
            return 0;
        }
    }
    cout << "0" << endl;
    return 0;
}
